﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public sealed partial class NetworkManager : NetworkProcessMain
{
	/// <summary>
	/// 레이드 보스 리스트
	/// </summary>
	/// <param name="t"></param>
	/// <param name="Callback"></param>
	public void C2S_RAIDBOSS_LIST(int t, System.Action<ResponseModel<List<RaidBoss>>> Callback)
	{
		NetMsg msg = new NetMsg();
		msg.Reset();
		msg.CallbackAck = Callback;
		msg.Type = typeof(ResponseModel<List<RaidBoss>>);
		
		PT_C2S_RAIDBOSS_LIST dataPush = new PT_C2S_RAIDBOSS_LIST();
		dataPush.Reset();
		dataPush.t = t;
		
		dataPush.PushData(ref msg);
		PushPacketToTrasmitQue(msg);
	}
	
	public void C2S_START_RAIDBOSS_BATTLE(System.Action<ResponseModel<RaidBossStartModel>> Callback, long friendId, int page = 1)
	{
		NetMsg msg = new NetMsg();
		msg.Reset();
		msg.CallbackAck = Callback;
		msg.Type = typeof(ResponseModel<RaidBossStartModel>);
		msg.IsShowError = false;
		
		PT_C2S_START_RAIDBOSS_BATTLE dataPush = new PT_C2S_START_RAIDBOSS_BATTLE();
		dataPush.Reset();
		if( UserData.Instance.raidBossModel != null )
		{
			dataPush.legionId = UserData.Instance.raidBossModel.legionId;
		}
		else if( WorldSceneManager.isSentSearch && UserData.Instance.researchResultData.dicoverBoss )
		{
			dataPush.legionId = UserData.Instance.userModel.id;
		}
		dataPush.friendId = friendId;
		dataPush.page = page;
		
		dataPush.PushData(ref msg);
		PushPacketToTrasmitQue(msg);
	}

	/*
	public void C2S_END_RAIDBOSS_BATTLE(System.Action<ResponseModel<RaidBossEndModel>> Callback, int res, int decHp, int[] seqNo, int[] seqType)
	{
		NetMsg msg = new NetMsg();
		msg.Reset();
		msg.CallbackAck = Callback;
		msg.Type = typeof(ResponseModel<RaidBossEndModel>);
		msg.IsShowError = false;
		
		PT_C2S_END_RAIDBOSS_BATTLE dataPush = new PT_C2S_END_RAIDBOSS_BATTLE();
		dataPush.Reset();
		dataPush.res = res;
		dataPush.decHp = decHp;
		dataPush.seqNo = seqNo;
		dataPush.seqType = seqType;
		
		dataPush.PushData(ref msg);
		PushPacketToTrasmitQue(msg);
	}
	*/

	public void C2S_END_RAIDBOSS_BATTLE(System.Action<ResponseModel<RaidBossEndModel>> Callback, int res, int decHp, int[] cs)
	{
		NetMsg msg = new NetMsg();
		msg.Reset();
		msg.CallbackAck = Callback;
		msg.Type = typeof(ResponseModel<RaidBossEndModel>);
		msg.IsShowError = false;
		
		PT_C2S_END_RAIDBOSS_BATTLE dataPush = new PT_C2S_END_RAIDBOSS_BATTLE();
		dataPush.Reset();
		dataPush.res = res;
		dataPush.decHp = decHp;
		dataPush.cs = cs;
		
		dataPush.PushData(ref msg);
		PushPacketToTrasmitQue(msg);
	}

}